Skip to content

查询订单

请求参数类型描述
out_trade_nostring商户系统内部订单号
queryobject声明请求的查询参数
sub_mchidstring微信支付分配的子商户号
php
$instance->v3->qrcode->transactions->outTradeNo->_out_trade_no_->getAsync([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance->chain('v3/qrcode/transactions/out-trade-no/{out_trade_no}')->getAsync([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$instance['v3/qrcode/transactions/out-trade-no/{out_trade_no}']->getAsync([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(json_decode((string) $response->getBody(), true));
})
->wait();
php
$response = $instance->v3->qrcode->transactions->outTradeNo->_out_trade_no_->get([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance->chain('v3/qrcode/transactions/out-trade-no/{out_trade_no}')->get([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
php
$response = $instance['v3/qrcode/transactions/out-trade-no/{out_trade_no}']->get([
  'out_trade_no' => '20150806125346',
  'query' => [
    'sub_mchid' => '1900000109',
  ],
]);
print_r(json_decode((string) $response->getBody(), true));
返回字典类型描述
appidstring公众账号ID
sub_appidstring子商户公众账号ID
sp_mchidstring商户号
sub_mchidstring子商户号
descriptionstring服务描述
create_timestring订单创建时间
out_trade_nostring商户订单号
transaction_idstring微信支付订单号
trade_statestring交易状态
SUCCESS | ACCEPTED | PAY_FAIL | REFUND 枚举值之一
trade_state_descriptionstring交易状态描述
success_timestring支付完成时间
bank_typestring付款银行
user_repay_statestring用户还款状态
NOT_REPAY | REPAID | ALL_REFUND 枚举值之一
repay_transaction_idstring还款微信支付订单号
repay_timestring垫资还款时间
attachstring附加数据
contract_idstring代扣签约ID
trade_scenestring交易场景
BUS | METRO 枚举值之一
bus_infoobject公交场景信息
start_timestring用户乘车时间(上车)
line_namestring乘车路线
plate_numberstring车牌号。
metro_infoobject地铁场景信息
start_timestring用户乘车时间(上车)
end_timestring用户下车时间
start_stationstring乘车起始站
end_stationstring乘车终点站
amountobject订单金额信息
promotion_detailobject[]优惠信息
coupon_idstring券ID
namestring优惠名称
scopestring优惠范围
GLOBAL | SINGLE 枚举值之一
typestring优惠类型
CASH | NOCASH 枚举值之一
stock_idstring活动ID
amountinteger优惠券面额
wechatpay_contributeinteger微信出资
merchant_contributeinteger商户出资
other_contributeinteger其他出资
currencystring优惠币种

Published on the GitHub by TheNorthMemory